#include "stdafx.h"
#include <boost/test/auto_unit_test.hpp>
#include <sstream>
#include <boost/lexical_cast.hpp>
#include "detail/bmock_location.hpp"

namespace bmock {
	BOOST_AUTO_TEST_CASE(test_print) {
		const size_t   LN = __LINE__;
		const std::string   expected = "\"test_location.cpp\"," + boost::lexical_cast<std::string>(LN);;
		const location lc(__FILE__,LN);
		std::ostringstream     os;

		BOOST_CHECK_NO_THROW(os << lc);
		const std::string lll = os.str();
		BOOST_CHECK_EQUAL(expected, lll);
	}
}
